<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var a=prompt("请输入数字");
    if (a%2==0){
        alert("输入的数字是偶数");
    }else {
        alert("输入的数字是奇数");
    }
</script>
</body>
</html>